#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
void test(int numsSize,int nums[],int k)
{
    int N = numsSize;
    int i = 0;
    k %= N;
    for (i = 0; i < k; i++)
    {
        int j = 0;
        int z = 0;
        z = nums[N - 1];
        for (j = N - 1; j >= 1; j--)
        {
            nums[j] = nums[j - 1];
        }
        nums[0] = z;
    }
    for (i = 0; i < N; i++)
    {
        printf("%d ", nums[i]);
    }
}
int main()
{
    int arr[7] = { 1,2,3,4,5,6,7 };
    int numsSize = 7;
    int k = 3;
    test(numsSize, arr,k);
	return 0;
}